﻿using J.Model;
using J.ProductGet.Application.Command.ReservationinformationtableCommand;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;

namespace J.ProductGet.Controllers
{
    /// <summary>
    /// 信息类型表(读)+预留信息(读)
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class ReservationinformationtableController : ControllerBase
    {
        private readonly IMediator _mediator;
        public ReservationinformationtableController(IMediator mediator)
        {
            _mediator = mediator;
        }
        /// <summary>
        /// 信息类型表数据显示
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public async Task<IActionResult> INFORMATIONTYPETABLEGet(INFORMATIONTYPETABLEGetCommand command)
        {
            return Ok(await _mediator.Send(command));
        }
        /// <summary>
        /// 预留信息表显示
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public async Task<IActionResult> RESERVATIONINFORMATIONTABLEGet(RESERVATIONINFORMATIONTABLEGetCommand command)
        {
            return Ok(await _mediator.Send(command));
        }
        /// <summary>
        /// 预留信息表反填
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public async Task<IActionResult> RESERVATIONINFORMATIONTABLEBackil(RESERVATIONINFORMATIONTABLEBackilCommand command)
        {
            return Ok(await _mediator.Send(command));
        }
    }
}
